/*
 * @Author:
 * @Date: 2023-04-25 11:16:18
 * @LastEditors:
 * @LastEditTime: 2023-08-28 18:28:23
 * @FilePath: \immoka-admin\src\api\guardActivity\index.js
 * @Description:
 *
 * Copyright (c) 2023 by ${git_name} , All Rights Reserved.
 */
import request from '@/utils/request'

export function giftList(params) {
  return request({
    url: `/build/goods/lists`,
    params
  })
}

export function getGiftList(params) {
  return request({
    url: `/gift/general-gift`,
    params
  })
}

export function getZbList(params) {
  return request({
    url: `/mall/product/list-all`,
    params
  })
}

export function addOrEditReward(data) {
  return request({
    url: `/build/goods/edit`,
    method: 'post',
    data
  })
}

export function delReward(id) {
  return request({
    url: `/build/goods/del/${id}`
  })
}

export function changeBtnReward(id, status) {
  return request({
    url: `/build/goods/status`,
    params: {
      status,
      id
    }
  })
}

// 设置
export function lottery3SettingList(query) {
  return request({
    url: `/admin/game/lottery3/setting`,
    method: 'get',
    params: query
  });
}
// 编辑设置
export function lottery3Setting(query) {
  return request({
    url: `/admin/game/lottery3/setting`,
    method: 'post',
    data: query
  });
}

// 横幅列表
export function buildBannersList(query) {
  return request({
    url: `/build/banners`,
    method: 'get',
    params: query
  });
}
// 添加横幅
export function buildBannersAdd(query) {
  return request({
    url: `/build/banners`,
    method: 'post',
    data: query
  });
}
// 删除横幅
export function buildBannersDelete(query) {
  return request({
    url: `/build/banners/${query.id}`,
    method: 'delete',
    data: query
  });
}
// 修改横幅状态
export function buildBannersStatus(query) {
  return request({
    url: `/build/banners/${query.id}/status`,
    method: 'put',
    data: query
  });
}
